#!/bin/sh
if [ ! -f configure.paths ]; then
  echo "No configure.paths found, please run ./configure" >&2
  exit 1
fi

. ./configure.paths

path_bin="$CONFIG_BINPATH"
path_lib="$CONFIG_LIBPATH"
path_include="$CONFIG_INCLUDEPATH"

if [ ! -d $path_bin ]; then
  mkdir $path_bin
fi

if [ ! -d $path_lib ]; then
  mkdir $path_lib
fi

if [ ! -d $path_include ]; then
  mkdir $path_include
fi

if [ ! -d $path_include/udbc ]; then
  mkdir $path_include/udbc
fi

cp ../../lib/libudbc.a $path_lib/
cp ../../include/udbc/*.h $path_include/udbc/
cp ../../lib/udbc_mysql.* $path_lib/
